import request from '@/axios';

export function getRoleList() {
    return request({
        url: '/role/getAll',
        method: 'get'
    })
}

export function queryRoleList(role) {
    return request({
        url: '/role/getRoleList',
        method: 'get',
        params: role
    })
}

export function findById(id) {
    return request({
        url: '/role/' + id,
        method: 'get'
    })
}

export function saveRole(role) {
    return request({
        url: '/role/save',
        method: 'post',
        params: role
    })
}

export function deleteRole(id) {
    return request({
        url: '/role/' + id,
        method: 'delete'
    })
}


export function changeRoleStatus(role) {
    return request({
        url: '/role/changeStatus',
        method: 'put',
        params: role
    })
}
